package cn.itcast.orders.mapper;

import cn.itcast.orders.pojo.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderDetailMapper {


    /**
     *批量添加订单明细表
     *
     */
    void insters(List<OrderDetail> orderDetails);

    /**
     * 根据订单id查询
     *
     * @param id
     * @return
     */
    @Select("select * from order_detail where order_id = #{id}")
    List<OrderDetail> getByOrderId(Integer id);
}